package com.woniuxy.controller;

import com.woniuxy.entity.Student;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

/**
 * @author 佘赛飞
 * @create 2021 -11 -22 3:32 PM
 */
@Controller
public class Mycontroller {

   /* @PostMapping("/user")
    public void addOne(Student student){
        System.out.println("查询所有:"+student);
    }*/

    @GetMapping("/user/{sid}/{sname}")
    public Student findOne(@PathVariable("sname") String sname, @PathVariable("sid") Integer sid) {
        System.out.println("sname:" + sname);
        System.out.println("sid:" + sid);
        return null;
    }

    @PutMapping("/user")
    public void UpdateOne(Student student) {
        System.out.println("student:" + student);

    }

    @DeleteMapping("/user/{sid}")
    public void deleteOne(@PathVariable Integer sid) {
        System.out.println("sid:" + sid);
    }
}
